//
//  SC_StackBarChartView.h
//  SCCharts
//
//  Created by Yang on 11/1/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "SC_StackBarChartColors.h"
#import "SC_StackBarChartData.h"

@protocol SC_StackBarChartViewDelegate

- (void)stackBarIsTouchedAtIndex:(NSInteger )index;

@end


@interface SC_StackBarChartView : UIView {
	NSMutableArray *dataArray;
	float viewWidth;
	float viewHeight;
	
	BOOL touchEnabled; // 控制是否监测touch events
	
	id <SC_StackBarChartViewDelegate> delegate;

}
@property(nonatomic,retain)id <SC_StackBarChartViewDelegate> delegate;

- (void)resetData:(NSArray *)array;
- (void)calculateHighValue;
- (void)drawBackLines:(CGContextRef )context;
- (void)drawYAxisLabels:(CGContextRef )context;
- (void)drawStackBars:(CGContextRef )context;
- (float )valueToY:(int )value;
- (void)drawTitles:(CGContextRef )context;
- (void)drawComments:(CGContextRef )context;

- (void)setTouchEnabled:(BOOL )enabled;
@end
